<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="mall/advert/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>供应商编辑</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input type="hidden" id="id" name="id" th:value="${supply.id}">
							<input type="hidden" id="cid" name="cid" th:value="${supply.cid}">
							<input type="hidden" id="bankId" name="bankId" th:value="${supply.bankId}">
							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>供应商名称:</label>
								<div class="col-sm-8">
									<input id="name" name="name" class="form-control" type="text"
										th:value="${supply.name}">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>供应商编号:</label>
								<div class="col-sm-8">
									<input id="supplycode" name="supplycode" class="form-control"
										type="text" th:value="${supply.supplycode}">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">所属分类:</label>
								<div class="col-sm-4">
									<select id="pcate" name="pcate" data-placeholder=""
										class="form-control chosen-select" tabindex="2"
										th:field="*{supply.pcate}" onchange="onPcateChange(this)">
										<option value="" selected="selected">选择顶级分类</option> <
										<option th:each="item: ${pcategorys}"
											th:selected="${supply.pcate eq item.id}"
											th:text="${item.name}" th:value="${item.id}"></option>
									</select>
								</div>
								<div class="col-sm-4">
									<select id="ccate" name="ccate" data-placeholder=""
										class="form-control chosen-select" tabindex="2"
										th:field="*{supply.ccate}">
										<option value="" selected="selected">选择下级分类</option>
										<!--<option th:each="item: ${baTypes}" th:text="${item.name}" th:value="${item.typeId}"></option>-->
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>持卡人:</label>
								<div class="col-sm-8">
									<input id="linkman" name="linkman" class="form-control"
										type="text" th:value="${supply.linkman}">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>银行预留手机号:</label>
								<div class="col-sm-8">
									<input id="mobile" name="mobile" class="form-control"
										type="text" th:value="${supply.mobile}">
								</div>
							</div>
							<div class="form-group">
							<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>身份证号码:</label>
								<div class="col-sm-8">
									<input id="cardId" name="cardId" class="form-control"
										type="text"
										th:value="${supply.cardId}">
								</div>
							</div>


							<div class="form-group">
									<label class="col-sm-3 control-label"><em
											class="gg-star">*</em>银行:
									</label>
									<div class="col-sm-4">
										<select id="tbCode" name="tbCode" data-placeholder=""
											class="form-control chosen-select" tabindex="2">
											<option value="" selected="selected">选择主行</option>
											<option th:each="item: ${trunk}" th:text="${item.tbName}"
												th:selected="${supply.tbCode eq item.tbCode}"
												th:value="${item.tbCode}"></option>
										</select>
									</div>
								</div>


								<div class="form-group">
								<label class="col-sm-3 control-label"><em
										class="gg-star">*</em>卡号:</label>
									<div class="col-sm-8">
										<input id="cardNo" name="cardNo" class="form-control"
											type="text" th:value="${supply.cardNo}">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">支行银联号:</label>
									<div class="col-sm-8">
										<input id="bbCode" name="bbCode" class="form-control"
											type="text" th:value="${supply.bbCode}" placeholder="对公必须填支行银联号">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">账户类型:</label>
									<div class="col-sm-8">
										<label class="radio-inline"> <input type="radio"
											name="isGong" value="0" th:field="*{supply.isGong}" /> 对私
										</label> <label class="radio-inline"> <input type="radio"
											name="isGong" value="1" th:field="*{supply.isGong}" /> 对公
										</label>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">联系座机:</label>
									<div class="col-sm-8">
										<input id="studio" name="studio" class="form-control"
											type="text" th:value="${supply.studio}">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">QQ/微信:</label>
									<div class="col-sm-8">
										<input id="qq" name="qq" class="form-control" type="text"
											th:value="${supply.qq}">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">联系地址:</label>
									<div class="col-sm-8">
										<input id="address" name="address" class="form-control"
											type="text" th:value="${supply.address}">
									</div>
								</div>

								<!--<input type="hidden" id="centreId"  name="centreId" th:value="${centreId}" th:if="${flag} == '1'">-->
								<!--<div class="form-group" th:if="${flag} == '0'">-->
								<!--<label class="col-sm-3 control-label">商户:</label>-->
								<!--<div class="col-sm-8">-->
								<!--<select name="centreId" class="form-control" type="text" th:field="*{supply.centreId}">-->
								<!--<option value="" selected="selected">&#45;&#45;不限&#45;&#45;</option>-->
								<!--<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>-->
								<!--</select>-->
								<!--</div>-->
								<!--</div>-->

								<div class="form-group">
									<label class="col-sm-3 control-label">绑定会员:</label>
									<div class="col-sm-8">
										<input id="mid" name="mid" class="form-control" type="hidden" th:value="${supply.mid}">
										<input id="username" name="username" placeholder="点击绑定会员" th:value="${supply.username}" class="form-control"
											type="text" readonly>
<!--										<td th:text="${supply.username}"></td>-->
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">关联买手:</label>
									<div class="col-sm-8">
										<input id="buymid" name="buymid" class="form-control"
											type="hidden" th:value="${supply.buymid}"> <input
											id="buyrealnm" name="buyrealnm" placeholder="点击关联买手"
											th:value="${supply.buyrealnm}" class="form-control"
											type="text" readonly onclick="relateMember1()">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">供应商LOGO:</label>
									<div class="col-sm-6">
										<input id="picUrl" name="picUrl" class="form-control"
											type="text" onblur="onThumbBlur()"
											th:value="${supply.picUrl}">
									</div>
									<div class="col-sm-2">
										<button type="button"
											onclick="onSelectImgBtnClick('picUrl','thumbImg')"
											class="btn btn-primary">
											<i class="fa fa-check"></i>选择图片
										</button>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-8">
										<label class="col-sm-5 control-label">-</label> <img
											class="img-responsive" id="thumbImg" src=""
											th:attr="src=${supply.picUrl}" style="max-width: 30%">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">排序:</label>
									<div class="col-sm-8">
										<input id="displayorder" name="displayorder"
											placeholder="数字越大排序越靠前" class="form-control" type="number"
											min="0" th:value="${supply.displayorder}">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">类型:</label>
									<div class="col-sm-8">
										<label class="radio-inline"> <input type="radio"
											name="type" value="0" th:field="*{supply.type}" /> 第三方
										</label> <label class="radio-inline"> <input type="radio"
											name="type" value="1" th:field="*{supply.type}" /> 自营
										</label>
									</div>
								</div>


								<div class="form-group">
									<label class="col-sm-3 control-label">是否显示:</label>
									<div class="switch onoffswitch col-sm-1">
										<div class="onoffswitch">
											<input type="checkbox" class="onoffswitch-checkbox" value="1"
												checked="" id="isShow" name="isShow"
												th:checked="${supply.isShow} == 1"> <label
												class="onoffswitch-label" for="isShow"> <span
												class="onoffswitch-inner"></span> <span
												class="onoffswitch-switch"></span>
											</label>
										</div>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-3 control-label">备注:</label>
									<div class="col-sm-8">
										<textarea id="remark" name="remark" class="form-control"
											th:text="${supply.remark}"></textarea>
									</div>
								</div>

								<div class="form-group text-center">
									<div class="col-sm-8 col-sm-offset-2">
										<button type="submit" class="btn btn-primary">
											<i class="fa fa-check"></i>提交
										</button>
										<div class="btn btn-danger" onclick="closeDow()">
											<i class="fa fa-remove"></i> 关闭
										</div>
									</div>
								</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="mall/advert/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/mall/supply/edit.js">
		
	</script>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
</body>

</html>
